package com.srxz.mobilepharmacy.util;

import com.srxz.mobilepharmacy.entity.UserInfoPK;

import javax.servlet.http.HttpSession;

public class SessionTool {
    public static Integer getHouse(HttpSession session){
        Object obj = session.getAttribute("userhouse");
        if(obj == null)
            return null;
        return Integer.valueOf(obj.toString());
    }

    public static UserInfoPK getUser(HttpSession session){
        Object obj = session.getAttribute("user");
        if(obj == null)
            return null;
        return (UserInfoPK) obj;
    }
}
